//
//  Gailan_grid_sub_view.m
//  ainkjj
//
//  Created by MAX on 2020/5/11.
//  Copyright © 2020 zhiyiLiu. All rights reserved.
//

#import "Gailan_grid_sub_view.h"

@implementation Gailan_grid_sub_view

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)init{
    self = [super init];
    
    if (self) {
        [self initUI];
    }
    
    return self;
}
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self initUI];
    }
    return self;
}
- (void) initUI{
    UIImageView *bgIv = [[UIImageView alloc] initWithImage:UIImageMake(@"zexian")];
    [self addSubview:bgIv];
    bgIv.frame  = CGRectMake((self.mj_w - bgIv.mj_w) * 0.5, self.mj_h - bgIv.mj_h - 10, bgIv.mj_w, bgIv.mj_h);
    self.bgIv = bgIv;
    
    UIImageView *iv = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 18, 18 )];
    //        iv.image = UIImageMake(imgName);
    [self addSubview:iv];
    self.iv = iv;
    
    UILabel *cishuLb = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxY(iv.frame)+ 2, 4, 100, 30)];
    [self addSubview:cishuLb];
    cishuLb.text = @"";
    self.cishuLb = cishuLb;
    
    UILabel *shijian_lb = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(cishuLb.frame), CGRectGetMaxY(cishuLb.frame), CGRectGetWidth(cishuLb.frame), cishuLb.mj_h)];
    [self addSubview:shijian_lb];
    shijian_lb.text = @"";
    shijian_lb.font = [UIFont systemFontOfSize:12];
    shijian_lb.textColor = [UIColor colorWithRed:153.0f/255.0f green:153.0f/255.0f blue:153.0f/255.0f alpha:1.0f];
    self.shijian_lb = shijian_lb;
}
@end
